"use strict";
cc._RF.push(module, 'a994f6kyt5Aj5DVkMUv+Osk', 'public_numberKeys_pop');
// scripts/public/public_numberKeys_pop.js

"use strict";

// Learn cc.Class:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/class.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/class/index.html
// Learn Attribute:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/reference/attributes.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/reference/attributes/index.html
// Learn life-cycle callbacks:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/life-cycle-callbacks.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/life-cycle-callbacks/index.html

/*
 * 自制键盘界面
 */
cc.Class({
    extends: cc.Component,

    properties: {
        _callBack: null
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start: function start() {},


    init: function init(call) {
        this._callBack = call;
    },

    //点击键盘，回调
    onClickEvent: function onClickEvent(event, customEventData) {
        if (this._callBack) this._callBack(customEventData);
    },

    //键盘显示
    onShow: function onShow() {
        this.node.setPosition(0, -1300);
        this.node.runAction(cc.moveTo(0.2, cc.p(0, -618)));
    },

    //键盘隐藏
    onHide: function onHide() {
        this.node.setPosition(0, -618);
        this.node.runAction(cc.moveTo(0.2, cc.p(0, -1300)));
    },

    onClose: function onClose() {
        this.node.destroy();
    }

    // update (dt) {},
});

cc._RF.pop();